<?php
require_once("vcl/vcl.inc.php");
require_once("lib/db_connection.php");
//Includes
use_unit("forms.inc.php");
use_unit("extctrls.inc.php");
use_unit("stdctrls.inc.php");

//Class definition
class Incident_del extends Page
{
       public $hiddenIncident = null;
       public $hiddenVeh = null;
       function Incident_delCreate($sender, $params)
       {
       $id = $_GET['veh'];
       $this->hiddenVeh->setValue($id);
       $incident_id = $_GET['incident'];
       $this->hiddenIncident->setValue($incident_id);
       //die($incident_id);
       $result = mysql_query("delete from veh_incident_tbl where incident_id='".$this->hiddenIncident->getValue()."'") or die(mysql_error());
       redirect('veh_incident_list2.php?veh='.$this->hiddenVeh->getValue());


       }

}

global $application;

global $Incident_del;

//Creates the form
$Incident_del=new Incident_del($application);

//Read from resource file
$Incident_del->loadResource(__FILE__);

//Shows the form
$Incident_del->show();

?>